<script setup lang="ts">
import ItemWrap from "@/components/item-wrap";
import LeftTop from "./left-top.vue";
import LeftCenter from "./left-center.vue";
import LeftBottom from "./left-bottom.vue";
import CenterMap from "./center-map.vue";
import RightTop from "./right-top.vue";
import RightCenter from "./right-center.vue";
import RightBottom from "./right-bottom.vue";


import updatePassword from './updatePassword.vue'
import { useRouter } from 'vue-router'
import {
  getUserInfo
} from '@/utils/storage.ts'


import { onMounted, ref } from 'vue'

const router = useRouter()
const showDialog: any = ref(false)
const uptatePasswordRef: any = ref(null)


onMounted(() => {
  if (getUserInfo().updatePassword) {
    uptatePasswordRef.value.open()
  }
})

</script>

<template>
  <div class="index-box">
    <div class="contetn_left">
      <LeftTop  class="contetn_left-top" />
      <LeftBottom class="contetn_left-bottom" />
    </div>
    <div class="contetn_center">
      <CenterMap class="contetn_center_map" title="地图区域" />
    </div>
    <div class="contetn_right ">
      <RightTop class="contetn_right_top " />
      <RightCenter class="contetn_right_center " />
      <RightBottom class="contetn_right_bottom " />
    </div>
  </div>
  <updatePassword ref="uptatePasswordRef" v-model:show="showDialog" />
</template>

<style scoped lang="scss">
.index-box {
  width: 100%;
  display: flex;
  height: calc(100% - 182px);
  justify-content: space-between;
}

.contetn_left {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 570px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.contetn_right {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 450px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.contetn_center {
  flex: 1;
  // margin: 2px 68px 0 46px;
  margin: 2px 0 0 0;
  display: flex;
  flex-direction: column;

  .contetn_center-bottom {
    height: 315px;
  }
}

.contetn_lr-item {
  height: 310px;
}

.contetn_left-top {
  height: 306px;
  margin-bottom: 52px;
}

.contetn_left-bottom {
  flex: 1;
}

.contetn_right_top {
  height: 270px;
  margin-bottom: 20px;
}

.contetn_right_center {
  height: 301px;
  margin-bottom: 36px;
}
.contetn_right_bottom {
  height: 243px;
}

</style>
